Get all objects
To get all instances, the GetAll method of a Data Object can be used.
The following code returns all existing Employees:
IList<Employee> list = Employee.GetAll(); |
To get a sorted result set, you can pass a sort clause to the GetAll method:
EmployeeSortClause sortClause = new EmployeeSortClause(); sortClause.AddLastname(); sortClause.AddFirstname(); IList<Employee> list = Employee.GetAll(sortClause); |
This will return all Employee objects in a (Lastname,Firstname) order.